<!DOCTYPE HTML>
<html lang="en-US">
<head>
	<meta charset="UTF-8">
	<title></title>
</head>
<body>
	<form name="myForm" action="" method="post" id="init_php" onkeydown="submitForm(event);">
		<label for="code">代码：</label>
		<textarea name="code" style="width:100%; height:150px;"></textarea><br />
		<input type="submit" value="Process" />
		<br />
	</form>
	<script type="text/javascript">
		function submitForm(event){
			if( event.ctrlKey && event.keyCode==13 ){
				document.myForm.submit();
			}
		}
	</script>
</body>
</html>
<?php
	$code = $_POST['code'];
	$str = '<?php '.$code.' ?>';
	if( false === file_put_contents("init_code.php",$str) ){
		die('file_put_contents function is not supported');
	}
	if($code) echo "<br><b>Process string:</b><br><pre>",htmlspecialchars($code),'</pre><br><b>Result:</b><br>';
	require("init_code.php");
?>
